import { get, post, del } from "@/utils/request";

// 封装轮播图获取商品接口
export const reqLunboP = (params) => get("/api/v1/products", params);

// 获取商品列表接口
export const reqProductList = (params) => get("/api/v1/products", params);

// 获取商品详情接口
export const reqProductDetail = (id) => get("/api/v1/products/" + id);

// 获取加入购物车接口
export const reqAddCart = (data) => post("/api/v1/shop_carts", data);

// 获取购物车列表接口
export const reqCartList = () => get("/api/v1/shop_carts");

// 获取删除购物车商品接口
export const reqDelCartList = (id) => del("/api/v1/shop_carts/" + id);

// 获取删除多个购物车商品接口
export const reqDelMany = (data) => post("/api/v1/shop_carts/delmany", data);
